"""
# -*- coding: utf-8 -*-
Time    : 2025/7/21 下午6:19
Author  : Micah
File    : test_fixture_with.py
Function:
"""

import smtplib
import pytest


@pytest.fixture()
def smtp_connection_yield():
    with smtplib.SMTP("smtp.163.com", 25, timeout=5) as smtp_connection:
        print("\nstart connection")
        yield smtp_connection
        print("\nend connection")


def test_send_mail(smtp_connection_yield):
    print("send mail")
